package com.qfedu.yanglao20app.handicapped.attention.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qfedu.yanglao20.entity.handicapped.HandicappedAttention;
import com.qfedu.yanglao20app.handicapped.attention.vo.AttentionVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author yujie
 * @data 2023/5/19 19:26
 */
public interface AppHandicappedAttentionDao extends BaseMapper<HandicappedAttention> {

    /**
     * 展示关注信息
     *
     * @param handicappedId
     * @return
     */
    List<AttentionVO> attentionList(Integer handicappedId);

    /**
     * 根据用户id 和关注id 删除关注信息
     *
     * @param id             关注id
     * @param handicapped_id 残疾人id
     */
    void deleteByHidAndId(@Param("id") Integer id, @Param("handicappedId") Integer handicapped_id);

    /**
     * 根据 用户 id 和关注 id 查询关注信息
     *
     * @param id             关注id
     * @param handicapped_id 用户id
     * @return
     */
    Integer selectByByHidAndId(@Param("id") Integer id, @Param("handicappedId") Integer handicapped_id);

    /**
     * 添加用户关注信息
     *
     * @param handicappedAttention
     */
    void insertAttention(HandicappedAttention handicappedAttention);
}
